/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package io.renren.modules.project.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.project.entity.FrontendEntity;
import io.renren.modules.systemconfig.entity.ProjectBaseEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 系统用户
 *
 * @author Mark sunlightcs@gmail.com
 */
@Mapper
public interface FrontendDao extends BaseMapper<FrontendEntity> {
    @Select("select f.*,pb.name as project_name from frontend f left join project_base pb on f.project_id = pb.id where f.name like #{key}")
    FrontendEntity queryByKey(String key);
    @Select("select f.*,pb.name as project_name from frontend f left join project_base pb on f.project_id = pb.id  limit ${size},${limit} ")
    List<FrontendEntity> selectEntityPage(String key, long size, long limit);
    @Select("select count(1) from frontend   ")
    long selectRecordSize(String key);
}
